package org.ruanjj.designprinciple.liskovsubstitution;

public class BirdCorrect implements Animal, Flyable{
    @Override
    public void fly() {
        System.out.println("I can fly");
    }

    @Override
    public void eat() {

    }

    @Override
    public void sleep() {

    }
}


//这里就是进行抽象加接口的拆分
class Sparrow extends BaseBird implements Flyable{

    @Override
    public void fly() {
        System.out.println("I can fly");
    }

    public static void main(String[] args) {
        Sparrow sparrow = new Sparrow();
        sparrow.eat();
    }
}



